package com.changcheng.project.baiinfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.changcheng.project.baiinfo.mapper.VersionInfoMapper;
import com.changcheng.project.baiinfo.domain.VersionInfo;
import com.changcheng.project.baiinfo.service.IVersionInfoService;
import com.changcheng.common.utils.text.Convert;

/**
 * 固件白名单Service业务层处理
 * 
 * @author dazhi
 * @date 2021-03-10
 */
@Service
public class VersionInfoServiceImpl implements IVersionInfoService 
{
    @Autowired
    private VersionInfoMapper versionInfoMapper;

    /**
     * 查询固件白名单
     * 
     * @param id 固件白名单ID
     * @return 固件白名单
     */
    @Override
    public VersionInfo selectVersionInfoById(Long id)
    {
        return versionInfoMapper.selectVersionInfoById(id);
    }

    /**
     * 查询固件白名单列表
     * 
     * @param versionInfo 固件白名单
     * @return 固件白名单
     */
    @Override
    public List<VersionInfo> selectVersionInfoList(VersionInfo versionInfo)
    {
        return versionInfoMapper.selectVersionInfoList(versionInfo);
    }

    /**
     * 新增固件白名单
     * 
     * @param versionInfo 固件白名单
     * @return 结果
     */
    @Override
    public int insertVersionInfo(VersionInfo versionInfo)
    {
        return versionInfoMapper.insertVersionInfo(versionInfo);
    }

    /**
     * 修改固件白名单
     * 
     * @param versionInfo 固件白名单
     * @return 结果
     */
    @Override
    public int updateVersionInfo(VersionInfo versionInfo)
    {
        return versionInfoMapper.updateVersionInfo(versionInfo);
    }

    /**
     * 删除固件白名单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVersionInfoByIds(String ids)
    {
        return versionInfoMapper.deleteVersionInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除固件白名单信息
     * 
     * @param id 固件白名单ID
     * @return 结果
     */
    @Override
    public int deleteVersionInfoById(Long id)
    {
        return versionInfoMapper.deleteVersionInfoById(id);
    }
}
